<template>
	<view>
		<view  class="introduction">
			入住须知
		</view>
		<view class="introduction small-title">入退时间</view>
		<view class="flex-between f30 mb10">
			<view>入住时间</view>
			<view>{{formData.check_in || '-'}}之后</view>
		</view>
		<view class="flex-between  f30 mb10">
			<view>退房时间</view>
			<view> {{formData.check_out  || '-'}}之前</view>
		</view>
		<view class="flex-between  f30 mb10">
			<view>最少入住</view>
			<view>{{formData.days  || '-'}}晚</view>
		</view>
		
		<view class="introduction small-title">入住要求</view>
		<view class="ask-con">
		     <view class="ask-item" >
				 {{formData.pet?'': '不'}}允许携带宠物
			 </view>
			 <view class="ask-item" >
			 	 {{formData.child?'': '不'}}允许儿童入住
			 </view>
			 <view class="ask-item" >
			 	 {{formData.smoking?'': '不'}}允许吸烟和大麻
			 </view>
			 <view class="ask-item" >
			 	 {{formData.party?'': '不'}}允许聚会活动
			 </view>
			
			 <view v-if="formData.other_notice" class="ask-item" >
				{{formData.other_notice}}
			 </view>
		</view>
		
		<view class="introduction small-title">退款政策</view>
		<view v-html="refundInfo" class="f30">
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				refundInfo: '',
				formData:  this.$getStorage('houseInfo')
			}
		},
		methods: {
			getConfiguration() {
				 this.$http.getConfiguration().then(res=>{
					 res.forEach(item => {
						 if(item.type == 'refund-policy') {
							 this.refundInfo = item.content;
						 }
					 })
				 });
			},
		},
		mounted() {
			this.getConfiguration();
		}
	}
</script>

<style lang="scss" scoped>
	.introduction {
		font-weight: bold;
		font-size: 43rpx;
		margin: 30rpx 0;
		
	}
	.small-title {
		font-size: 30rpx;
	}
	
	.ask-con {
		.ask-item {
			font-size: 30rpx;
			margin-right: 30rpx;
			margin-bottom: 30rpx;
			display: inline-block;
		}
	}
</style>